package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.entity.User;
import com.itheima.vo.UserVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    @Select("select DATE_FORMAT(create_date,'%Y-%m') as ndate,count(create_date) as counts from user group by ndate order by ndate")
    List<UserVO> getUserCounts();
}
